public class myqueue
{
	private int[] Queue;
	private int top = 0;
	private int size;
	
	public void addElement(int u)
	{
		Queue[top] = u;
		top = top+1;
		print();
	}
	
	public int getElement()
	{
		int temp = Queue[0];
		Queue [0] = -1;
		nachschieben();
		return temp;
		
	}
	
	public int printElement(int i)
	{
		return Queue[i];
	}
	
	public int getElementCount()
	{
		return top;
	
	}
	
	myqueue(int size)
	{
		this.size = size;
		Queue = new int[size];
		
		int i=0;
		
		for(i=0;i<size;i++)
		{
			Queue[i] = -1;
		}
	}
	
	public void print()
	{
		int i=0;
		// System.out.println("Queue[" + i + "] : "+ getElement());
		
		while (i<top)
		{
			System.out.println("Queue[" + i + "] : "+ printElement(i));
			i++;
		}
	}
	
	
	public void nachschieben()
	{
		int i=1;
		while(i<top)
		{
			Queue[i-1] = Queue[i];
			i++;
		}
		Queue[i] = -1;
	}
}
	
		